<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
ParseFile
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../style.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="ParseFile";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../com/parse/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ParseFile.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../com/parse/ParseFacebookUtils.html" title="class in com.parse"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../com/parse/ParseGeoPoint.html" title="class in com.parse"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?com/parse/ParseFile.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ParseFile.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.parse</FONT>
<BR>
Class ParseFile</H2>
<PRE>
<A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>
  <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>com.parse.ParseFile</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>ParseFile</B><DT>extends <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>

<P>
ParseFile is a local representation of a file that is saved to the Parse cloud.
 <p>
 The workflow is to construct a ParseFile with data and optionally a filename. Then save it and
 set it as a field on a ParseObject.
 <p>
 Example: ParseFile file = new ParseFile("hello".getBytes()); file.save(); ParseObject object =
 new ParseObject("TestObject"); object.put("file", file); object.save();
<P>

<P>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#ParseFile(byte[])">ParseFile</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new file from a byte array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#ParseFile(byte[], java.lang.String)">ParseFile</A></B>(byte[]&nbsp;data,
          <A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;contentType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new file from a byte array, and content type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#ParseFile(java.lang.String, byte[])">ParseFile</A></B>(<A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
          byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new file from a byte array and a name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#ParseFile(java.lang.String, byte[], java.lang.String)">ParseFile</A></B>(<A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
          byte[]&nbsp;data,
          <A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;contentType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new file from a byte array, file name, and content type.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#cancel()">cancel</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cancels the current network request and callbacks whether it's uploading or fetching data from
 the server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#getData()">getData</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Synchronously gets the data for this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;bolts.Task&lt;byte[]&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#getDataInBackground()">getDataInBackground</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the data for this object in a background thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#getDataInBackground(com.parse.GetDataCallback)">getDataInBackground</A></B>(<A HREF="../../com/parse/GetDataCallback.html" title="class in com.parse">GetDataCallback</A>&nbsp;dataCallback)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the data for this object in a background thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#getDataInBackground(com.parse.GetDataCallback, com.parse.ProgressCallback)">getDataInBackground</A></B>(<A HREF="../../com/parse/GetDataCallback.html" title="class in com.parse">GetDataCallback</A>&nbsp;dataCallback,
                    <A HREF="../../com/parse/ProgressCallback.html" title="class in com.parse">ProgressCallback</A>&nbsp;progressCallback)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the data for this object in a background thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;bolts.Task&lt;byte[]&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#getDataInBackground(com.parse.ProgressCallback)">getDataInBackground</A></B>(<A HREF="../../com/parse/ProgressCallback.html" title="class in com.parse">ProgressCallback</A>&nbsp;progressCallback)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the data for this object in a background thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#getName()">getName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The filename.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#getUrl()">getUrl</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This returns the url of the file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#isDataAvailable()">isDataAvailable</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether the file has available data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#isDirty()">isDirty</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether the file still needs to be saved.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#save()">save</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves the file to the Parse cloud synchronously.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;bolts.Task&lt;<A target="_top" HREF="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#saveInBackground()">saveInBackground</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves the file to the Parse cloud in a background thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;bolts.Task&lt;<A target="_top" HREF="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#saveInBackground(com.parse.ProgressCallback)">saveInBackground</A></B>(<A HREF="../../com/parse/ProgressCallback.html" title="class in com.parse">ProgressCallback</A>&nbsp;progressCallback)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves the file to the Parse cloud in a background thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#saveInBackground(com.parse.SaveCallback)">saveInBackground</A></B>(<A HREF="../../com/parse/SaveCallback.html" title="class in com.parse">SaveCallback</A>&nbsp;callback)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves the file to the Parse cloud in a background thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../com/parse/ParseFile.html#saveInBackground(com.parse.SaveCallback, com.parse.ProgressCallback)">saveInBackground</A></B>(<A HREF="../../com/parse/SaveCallback.html" title="class in com.parse">SaveCallback</A>&nbsp;saveCallback,
                 <A HREF="../../com/parse/ProgressCallback.html" title="class in com.parse">ProgressCallback</A>&nbsp;progressCallback)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves the file to the Parse cloud in a background thread.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A target="_top" HREF="http://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="ParseFile(java.lang.String, byte[], java.lang.String)"><!-- --></A><H3>
ParseFile</H3>
<PRE>
public <B>ParseFile</B>(<A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
                 byte[]&nbsp;data,
                 <A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;contentType)</PRE>
<DL>
<DD>Creates a new file from a byte array, file name, and content type. Content type will be used
 instead of auto-detection by file extension.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The file's name, ideally with extension. The file name must begin with an alphanumeric
          character, and consist of alphanumeric characters, periods, spaces, underscores, or
          dashes.<DD><CODE>data</CODE> - The file's data.<DD><CODE>contentType</CODE> - The file's content type.</DL>
</DL>
<HR>

<A NAME="ParseFile(byte[])"><!-- --></A><H3>
ParseFile</H3>
<PRE>
public <B>ParseFile</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD>Creates a new file from a byte array.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - The file's data.</DL>
</DL>
<HR>

<A NAME="ParseFile(java.lang.String, byte[])"><!-- --></A><H3>
ParseFile</H3>
<PRE>
public <B>ParseFile</B>(<A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
                 byte[]&nbsp;data)</PRE>
<DL>
<DD>Creates a new file from a byte array and a name. Giving a name with a proper file extension
 (e.g. ".png") is ideal because it allows Parse to deduce the content type of the file and set
 appropriate HTTP headers when it is fetched.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The file's name, ideally with extension. The file name must begin with an alphanumeric
          character, and consist of alphanumeric characters, periods, spaces, underscores, or
          dashes.<DD><CODE>data</CODE> - The file's data.</DL>
</DL>
<HR>

<A NAME="ParseFile(byte[], java.lang.String)"><!-- --></A><H3>
ParseFile</H3>
<PRE>
public <B>ParseFile</B>(byte[]&nbsp;data,
                 <A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;contentType)</PRE>
<DL>
<DD>Creates a new file from a byte array, and content type. Content type will be used instead of
 auto-detection by file extension.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - The file's data.<DD><CODE>contentType</CODE> - The file's content type.</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getName()"><!-- --></A><H3>
getName</H3>
<PRE>
public <A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getName</B>()</PRE>
<DL>
<DD>The filename. Before save is called, this is just the filename given by the user (if any).
 After save is called, that name gets prefixed with a unique identifier.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The file's name.</DL>
</DD>
</DL>
<HR>

<A NAME="isDirty()"><!-- --></A><H3>
isDirty</H3>
<PRE>
public boolean <B>isDirty</B>()</PRE>
<DL>
<DD>Whether the file still needs to be saved.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>Whether the file needs to be saved.</DL>
</DD>
</DL>
<HR>

<A NAME="isDataAvailable()"><!-- --></A><H3>
isDataAvailable</H3>
<PRE>
public boolean <B>isDataAvailable</B>()</PRE>
<DL>
<DD>Whether the file has available data.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getUrl()"><!-- --></A><H3>
getUrl</H3>
<PRE>
public <A target="_top" HREF="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getUrl</B>()</PRE>
<DL>
<DD>This returns the url of the file. It's only available after you save or after you get the file
 from a ParseObject.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The url of the file.</DL>
</DD>
</DL>
<HR>

<A NAME="save()"><!-- --></A><H3>
save</H3>
<PRE>
public void <B>save</B>()
          throws <A HREF="../../com/parse/ParseException.html" title="class in com.parse">ParseException</A></PRE>
<DL>
<DD>Saves the file to the Parse cloud synchronously.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../com/parse/ParseException.html" title="class in com.parse">ParseException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="saveInBackground(com.parse.ProgressCallback)"><!-- --></A><H3>
saveInBackground</H3>
<PRE>
public bolts.Task&lt;<A target="_top" HREF="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</A>&gt; <B>saveInBackground</B>(<A HREF="../../com/parse/ProgressCallback.html" title="class in com.parse">ProgressCallback</A>&nbsp;progressCallback)</PRE>
<DL>
<DD>Saves the file to the Parse cloud in a background thread.
 `progressCallback` is guaranteed to be called with 100 before saveCallback is called.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>progressCallback</CODE> - A ProgressCallback that is called periodically with progress updates.
<DT><B>Returns:</B><DD>A Task that will be resolved when the save completes.</DL>
</DD>
</DL>
<HR>

<A NAME="saveInBackground()"><!-- --></A><H3>
saveInBackground</H3>
<PRE>
public bolts.Task&lt;<A target="_top" HREF="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</A>&gt; <B>saveInBackground</B>()</PRE>
<DL>
<DD>Saves the file to the Parse cloud in a background thread.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>A Task that will be resolved when the save completes.</DL>
</DD>
</DL>
<HR>

<A NAME="saveInBackground(com.parse.SaveCallback, com.parse.ProgressCallback)"><!-- --></A><H3>
saveInBackground</H3>
<PRE>
public void <B>saveInBackground</B>(<A HREF="../../com/parse/SaveCallback.html" title="class in com.parse">SaveCallback</A>&nbsp;saveCallback,
                             <A HREF="../../com/parse/ProgressCallback.html" title="class in com.parse">ProgressCallback</A>&nbsp;progressCallback)</PRE>
<DL>
<DD>Saves the file to the Parse cloud in a background thread.
 `progressCallback` is guaranteed to be called with 100 before saveCallback is called.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>saveCallback</CODE> - A SaveCallback that gets called when the save completes.<DD><CODE>progressCallback</CODE> - A ProgressCallback that is called periodically with progress updates.</DL>
</DD>
</DL>
<HR>

<A NAME="saveInBackground(com.parse.SaveCallback)"><!-- --></A><H3>
saveInBackground</H3>
<PRE>
public void <B>saveInBackground</B>(<A HREF="../../com/parse/SaveCallback.html" title="class in com.parse">SaveCallback</A>&nbsp;callback)</PRE>
<DL>
<DD>Saves the file to the Parse cloud in a background thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>callback</CODE> - A SaveCallback that gets called when the save completes.</DL>
</DD>
</DL>
<HR>

<A NAME="getData()"><!-- --></A><H3>
getData</H3>
<PRE>
public byte[] <B>getData</B>()
               throws <A HREF="../../com/parse/ParseException.html" title="class in com.parse">ParseException</A></PRE>
<DL>
<DD>Synchronously gets the data for this object. You probably want to use
 <A HREF="../../com/parse/ParseFile.html#getDataInBackground(com.parse.ProgressCallback)"><CODE>ParseFile.getDataInBackground(com.parse.ProgressCallback)</CODE></A> instead unless you're already in a background thread.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../com/parse/ParseException.html" title="class in com.parse">ParseException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="getDataInBackground(com.parse.ProgressCallback)"><!-- --></A><H3>
getDataInBackground</H3>
<PRE>
public bolts.Task&lt;byte[]&gt; <B>getDataInBackground</B>(<A HREF="../../com/parse/ProgressCallback.html" title="class in com.parse">ProgressCallback</A>&nbsp;progressCallback)</PRE>
<DL>
<DD>Gets the data for this object in a background thread. `progressCallback` is guaranteed to be
 called with 100 before dataCallback is called.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>progressCallback</CODE> - A ProgressCallback that is called periodically with progress updates.
<DT><B>Returns:</B><DD>A Task that is resolved when the data has been fetched.</DL>
</DD>
</DL>
<HR>

<A NAME="getDataInBackground()"><!-- --></A><H3>
getDataInBackground</H3>
<PRE>
public bolts.Task&lt;byte[]&gt; <B>getDataInBackground</B>()</PRE>
<DL>
<DD>Gets the data for this object in a background thread. `progressCallback` is guaranteed to be
 called with 100 before dataCallback is called.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>A Task that is resolved when the data has been fetched.</DL>
</DD>
</DL>
<HR>

<A NAME="getDataInBackground(com.parse.GetDataCallback, com.parse.ProgressCallback)"><!-- --></A><H3>
getDataInBackground</H3>
<PRE>
public void <B>getDataInBackground</B>(<A HREF="../../com/parse/GetDataCallback.html" title="class in com.parse">GetDataCallback</A>&nbsp;dataCallback,
                                <A HREF="../../com/parse/ProgressCallback.html" title="class in com.parse">ProgressCallback</A>&nbsp;progressCallback)</PRE>
<DL>
<DD>Gets the data for this object in a background thread. `progressCallback` is guaranteed to be
 called with 100 before dataCallback is called.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dataCallback</CODE> - A GetDataCallback that is called when the get completes.<DD><CODE>progressCallback</CODE> - A ProgressCallback that is called periodically with progress updates.</DL>
</DD>
</DL>
<HR>

<A NAME="getDataInBackground(com.parse.GetDataCallback)"><!-- --></A><H3>
getDataInBackground</H3>
<PRE>
public void <B>getDataInBackground</B>(<A HREF="../../com/parse/GetDataCallback.html" title="class in com.parse">GetDataCallback</A>&nbsp;dataCallback)</PRE>
<DL>
<DD>Gets the data for this object in a background thread.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dataCallback</CODE> - A GetDataCallback that is called when the get completes.</DL>
</DD>
</DL>
<HR>

<A NAME="cancel()"><!-- --></A><H3>
cancel</H3>
<PRE>
public void <B>cancel</B>()</PRE>
<DL>
<DD>Cancels the current network request and callbacks whether it's uploading or fetching data from
 the server.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../com/parse/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ParseFile.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../com/parse/ParseFacebookUtils.html" title="class in com.parse"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../com/parse/ParseGeoPoint.html" title="class in com.parse"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?com/parse/ParseFile.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ParseFile.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>
